import requset from '@/api/request'

/**
 * 退单列表
 */
export function findReturnApply(start, limit, data) {
  return requset({
    url: `/lejuAdmin/orderReturn/findReturnApply/${start}/${limit}`,
    method: 'POST',
    data
  })
}
/**
 * 根据id查询退单明细
 * @param {*} id
 */
export function orderReturn(id) {
  return requset({
    url: `/lejuAdmin/orderReturn/${id}`,
    method: 'GET'
  })
}
/**
 * 同意退货
 * @param {}} id
 * @param data  {id: xxx,handleMan: xxx,...}
 */
export function agreeApply(id, data) {
  return requset({
    url: `/lejuAdmin/orderReturn/agreeApply/${id}`,
    method: 'POST',
    data
  })
}
/**
 * 拒绝退货
 * @param {*} id
 * @param {*} data
 */
export function rejectApply(id, data) {
  return requset({
    url: `/lejuAdmin/orderReturn/rejectApply/${id}`,
    method: 'POST',
    data
  })
}

/**
 * 确认收货
 * @param {*} id
 * @param {*} data
 */
export function receiveProduct(id, data) {
  return requset({
    url: `/lejuAdmin/orderReturn/receiveProduct/${id}`,
    method: 'POST',
    data
  })
}

/**
 * 强制确认收货
 * @param {*} id
 * @param {*} data
 */
export function receiveProductsForce(orderId) {
  return requset({
    url: `/lejuAdmin/order/receiveProductsForce/${orderId}`,
    method: 'POST'
  })
}
